package edu.ctbu.insurance.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * <p>
 * 
 * </p>
 *
 * @author djl
 * @since 2024-06-28
 */
@TableName("t_customer")
public class Customer implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 客户表id 主键，自增
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    /**
     * 客户ID
     */
//    @TableId(value = "customer_id")
    private String customerId;

    /**
     * 客户姓名
     */
    private String customerName;

    /**
     * 客户性别 1男 2女
     */
    private Integer customerSex;

    /**
     * 客户年龄
     */
    private Integer customerAge;

    /**
     * 客户身份证号码
     */
    private String customerCard;

    /**
     * 客户电话
     */
    private String customerPhone;

    /**
     * 客户地址
     */
    private String customerAddress;

    /**
     * 删除标识 1未删除 0已删除 默认为1
     */
    @TableField(exist = false)//该属性不参与mybatis-plus的生成映射
    private Integer deleteFlag;

    /**
     * 删除时间标识  默认为null
     */
    @TableField(exist = false)//该属性不参与mybatis-plus的生成映射
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy/MM/dd HH:mm:ss",timezone="GMT+8")//将数据库时间转换为正常格式
    private Timestamp deleteDate;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCustomerId() {
        return customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getCustomerAddress() {
        return customerAddress;
    }

    public void setCustomerAddress(String customerAddress) {
        this.customerAddress = customerAddress;
    }

    public String getCustomerPhone() {
        return customerPhone;
    }

    public void setCustomerPhone(String customerPhone) {
        this.customerPhone = customerPhone;
    }

    public Integer getCustomerSex() {
        return customerSex;
    }

    public void setCustomerSex(Integer customerSex) {
        this.customerSex = customerSex;
    }

    public Integer getCustomerAge() {
        return customerAge;
    }

    public void setCustomerAge(Integer customerAge) {
        this.customerAge = customerAge;
    }

    public String getCustomerCard() {
        return customerCard;
    }

    public void setCustomerCard(String customerCard) {
        this.customerCard = customerCard;
    }

    public Integer getCustomerFlag() {
        return deleteFlag;
    }

    public void setCustomerFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public Timestamp getDeleteDate() {
        return deleteDate;
    }

    public void setDeleteDate(Timestamp deleteDate) {
        this.deleteDate = deleteDate;
    }

    @Override
    public String toString() {
        return "Customer{" +
                "customerId=" + customerId +
                ", customerName='" + customerName + '\'' +
                ", customerSex='" + customerSex + '\'' +
                ", customerAge=" + customerAge +
                ", customerCard='" + customerCard + '\'' +
                ", customerPhone='" + customerPhone + '\'' +
                ", customerAddress='" + customerAddress + '\'' +
                '}';
    }
}
